package com.ljl.mvvmdemo

import android.app.Application

/**
 * 应用application
 * created by luojialun on 2024/3/20
 */

lateinit var myApp: MyApp

fun getApplication(): Application {
    if (null == myApp) {
        throw NullPointerException("application null")
    }
    return myApp
}

class MyApp : Application() {

    override fun onCreate() {
        super.onCreate()
        myApp = this
    }


}